package com.cby.android.sample.adapter.binder

import com.cby.android.sample.R
import com.cby.android.sample.bean.zhixin.ZhiXinSuggestionBean
import com.chad.library.adapter.base.binder.QuickItemBinder
import com.chad.library.adapter.base.viewholder.BaseViewHolder


/**
 * @description: 生活指数
 *
 * @author ChenBaoyang
 * @date 4/27/21 16:42
 */
class WeatherSuggestionItemBinder : QuickItemBinder<ZhiXinSuggestionBean>() {


    override fun convert(holder: BaseViewHolder, data: ZhiXinSuggestionBean) {
        data.run {
            holder.setText(R.id.tv_suggestion_01, carWashing.brief)
            holder.setText(R.id.tv_suggestion_02, dressing.brief)
            holder.setText(R.id.tv_suggestion_03, flu.brief)
            holder.setText(R.id.tv_suggestion_04, sport.brief)
            holder.setText(R.id.tv_suggestion_05, travel.brief)
            holder.setText(R.id.tv_suggestion_06, uv.brief)
        }

    }

    override fun getLayoutId() = R.layout.item_weather_suggestion
}